#!/bin/bash

# properly appends $* (i.e all arguments) to all existing diet dbs

script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

for db in "$script_dir"/*/*modprobed.db
do
  for mod in $*
  do
    echo "$mod" >> "$db"
  done
done

"$script_dir"/sort-modprobed-dbs
